1. Field of the Invention
The present invention is related to methods for data storage, and more particularly, to storing graph data.
2. Description of the Related Art
Data is typically stored in databases. The most common databases are relational databases. A relational database is a set of tables consisting of columns and rows. All tables are connected (i.e., related) to each other via a primary key. The data is retrieved from the database by, for example, SQL queries that return data from one or several tables.
One SQL query can retrieve data from several tables by using JOIN SQL operator that connects table using the primary key. A relational database system is very complex. For example, a simple SELECT statement for selecting the data can be executed in a variety of ways. The relational database engine finds an optimal way of selecting and retrieving data. The database engine applies optimization algorithms in order to return data in a fastest way possible.
However, in cases of hundreds of thousands or even millions of records, data retrieval can be quite slow. The data can be stored and retrieved faster, if the data is stored in a form of triples, quadruples or combinations of an arbitrary number of elements. Conventional relational databases also can operate with triples or quadruples-type data, however, there are a number of disadvantages of this approach, such as data redundancy, which in turn leads to anomalies and data inconsistencies. Processing and searching through triplets in conventional databases is also a computationally intensive process, which leads to slowdowns when working with relational databases.
Accordingly, there is a need in the art for a system and method for efficient storage and retrieval of complex graph data formed into triples, quadruples, quintuples, etc.